

(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
			$.validationEngineLanguage.allRules = 	{"required":{    			// Add your regex rules here, you can take telephone as an example
						"regex":"none",
						"alertText":"* 请填写。",
						"alertTextCheckboxMultiple":"* 请选择。",
						"alertTextCheckboxe":"* This checkbox is required"},
					"length":{
						"regex":"none",
						"alertText":"* Between ",
						"alertText2":" and ",
						"alertText3": " characters allowed"},
					"uLength":{
						"regex":"none",
						"alertText":"* 仅允许长度为 ",
						"alertText2":" 到 ",
						"alertText3": " 的输入（一个中文算两个字符）。"},
					"fixedLength":{
						"regex":"none",
						"alertText":"* 输入长度必须为 ",
						"alertText2":"，"},
					"maxCheckbox":{
						"regex":"none",
						"alertText":"* Checks allowed Exceeded"},	
					"minCheckbox":{
						"regex":"none",
						"alertText":"* Please select ",
						"alertText2":" options"},	
					"confirm":{
						"regex":"none",
						"alertText":"* Your field is not matching"},		
					"telephone":{
						"regex":"/^[0-9\-\(\)\ ]+$/",
						"alertText":"* Invalid phone number"},	
					"email":{
						"regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+\.[a-zA-Z0-9]{2,4}$/",
						"alertText":"* 不合法的邮箱地址。"},	
					"date":{
                         "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
                         "alertText":"* 不合法的日期，日期格式为YYYY-MM-DD。"},
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"* 只能输入数字。"},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* No special caracters allowed"},	
					"ajaxUser":{
						"file":"validateUser.php",
						"extraData":"name=eric",
						"alertTextOk":"* This user is available",	
						"alertTextLoad":"* Loading, please wait",
						"alertText":"* This user is already taken"},	
					"ajaxName":{
						"file":"validateUser.php",
						"alertText":"* This name is already taken",
						"alertTextOk":"* This name is available",	
						"alertTextLoad":"* Loading, please wait"},		
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \']+$/",
						"alertText":"* Letters only"},
					"validate2fields":{
    					"nname":"validate2fields",
    					"alertText":"* You must have a firstname and a lastname"},
					"validateUsername" : {
						"nname" : "validateUsername",
						"alertText" : "* 不合法的手机号或邮箱。"},
					"validateMobile" : {
						"nname" : "validateMobile",
						"alertText" : "* 不合法的手机号。"},
					"validatePassword" : {
						"nname" : "validatePassword",
						"alertText" : "* 不合法的密码（密码仅能包含'.'、空格、英文字母以及数字）。"},
					"validateOldPass" : {
						"nname" : "validateOldPass",
						"alertText" : "* 不合法的密码（密码仅能包含'.'、空格、英文字母以及数字）。"},
					"validateNewPass" : {
						"nname" : "validateNewPass",
						"alertText" : "* 不合法的密码（密码仅能包含'.'、空格、英文字母以及数字）。"},
					"validateRetypePass" : {
						"nname" : "validateRetypePass",
						"alertText" : "* 两次输入的密码不匹配，请重新输入。"},
					"validateName" : {
						"nname" : "validateName",
						"alertText" : "* 输入仅能包含中文、英文字母或空格。"}
			}
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});